" Install Vundle
" $ git clone https://github.com/VundleVim/Vundle.vim.git  ~/.vim/bundle/vundle
" : PluginInstall
" using command dos2unix to fix vim E492 error

" Vundle configure
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/

call vundle#begin()

Plugin 'gmarik/vundle'
Plugin 'majutsushi/tagbar'
Plugin 'scrooloose/nerdtree'
Plugin 'Lokaltog/vim-easymotion'
" Plugin 'pyflakes'
" Plugin 'Valloric/YouCompleteMe.git'
Plugin 'MattesGroeger/vim-bookmarks'

call vundle#end()

"tagbar
nmap <F8> :TagbarToggle<CR>
let g:tagbar_ctags_bin = 'ctags'
let g:tagbar_width = 30

" NERDTree
nmap <F2> :NERDTreeToggle<CR>

" EasyMotion
let g:EasyMotion_leader_key='<Space>'
" Turn on case insensitive feature
let g:EasyMotion_smartcase = 1
map  / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)

" These `n` & `N` mappings are options. You do not have to map `n` & `N` to EasyMotion.
" Without these mappings, `n` & `N` works fine. (These mappings just provide
" different highlight method and have some other features )
" map  n <Plug>(easymotion-next)
" map  N <Plug>(easymotion-prev)

filetype plugin indent on
" Set tab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab

" Set Number Line
set nu

" Set Highlight
syntax on

" Ignore case in searches
set ignorecase

" Set paste mode
set paste

" Save file position
if has("autocmd")
   autocmd BufRead *.txt set tw=78
   autocmd BufReadPost *
      \ if line("'\"") > 0 && line ("'\"") <= line("$") |
      \   exe "normal g'\"" |
      \ endif
endif

" Set Auto Indent
set autoindent
set smartindent
set cindent

" Color theme
colo desert

" GUI Font
set guifont=Monospace\ 14

" Disable cursor blinking
set gcr=a:block-blinkon0

" Chinese display
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
